package com.itheima.service.impl;

import com.itheima.dao.StrudentDao;
import com.itheima.dao.TeacherDao;
import com.itheima.service.TeacherService;

public class TeacherServiceImpl implements TeacherService {
    //声明dao
    //1.把new干掉
    private TeacherDao teacherDao;
    //2.给属性提供一个set方法
    public void setTeacherDao(TeacherDao teacherDao){
        this.teacherDao = teacherDao;
    }

    @Override
    public void save() {
        System.out.println("TeacherServiceImpl set...");
        teacherDao.save();
    }
}
